use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
pub struct ZedConfig {
    /// Zed编辑器的启动参数
    pub args: Option<Vec<String>>,
    /// Zed可执行文件路径
    pub zed_path: Option<String>,
    /// 是否启用Zed的协作功能
    pub enable_collaboration: Option<bool>,
    /// 是否自动保存文件
    pub autosave: Option<bool>,
    /// 是否启用语法高亮
    pub syntax_highlighting: Option<bool>,
    /// 默认主题
    pub default_theme: Option<String>,
    /// 字体设置
    pub font: Option<FontConfig>,
    /// 窗口配置
    pub window: Option<WindowConfig>,
}

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
pub struct FontConfig {
    /// 字体名称
    pub family: Option<String>,
    /// 字体大小
    pub size: Option<f32>,
    /// 行高
    pub line_height: Option<f32>,
}

#[derive(Debug, Clone, Serialize, Deserialize, Default)]
pub struct WindowConfig {
    /// 窗口宽度
    pub width: Option<u32>,
    /// 窗口高度
    pub height: Option<u32>,
    /// 是否全屏
    pub fullscreen: Option<bool>,
}